﻿using System;
using UnityEngine;

namespace IllusionUtility.GetUtility
{
	// Token: 0x02000635 RID: 1589
    public static class AnimationEx
	{
		// Token: 0x060025FE RID: 9726 RVA: 0x0014649C File Offset: 0x0014469C
		public static AnimationClip GetPlayingClip(this Animation animation)
		{
			AnimationClip result = null;
			float num = 0f;
			foreach (object obj in animation)
			{
				AnimationState animationState = (AnimationState)obj;
				if (animationState.enabled)
				{
					if (num < animationState.weight)
					{
						num = animationState.weight;
						result = animationState.clip;
					}
				}
			}
			return result;
		}
	}
}
